<?php if (!defined('THINK_PATH')) exit();?> 
 
 <html>
  <head>
    <title>美业红</title>
    <meta http-equiv="content-type" content="text/php;charset=utf-8">
    <script type='text/javascript' src='/public/js/jquery-1.11.2.min.js'></script>
    <script type="text/javascript" src='/public/js/jquery.validate.js'></script>
    <link rel="stylesheet" href="http://apps.bdimg.com/libs/bootstrap/3.2.0/css/bootstrap.min.css">
    <script src="http://cdn.static.runoob.com/libs/jquery/2.1.1/jquery.min.js"></script>
    <script src="http://cdn.static.runoob.com/libs/bootstrap/3.3.7/js/bootstrap.min.js"></script>
    <link href="/public/css/admin.css" rel="stylesheet">
  </head>
  <body>
      <div class=" navbar-default" id='class' >
        <div class="navbar-header">
          <a class="" href="/admin/index"><span class="navbar-brand"><span class="fa fa-paper-plane"></span><i>后台管理</i></span></a>
        </div>
        <div class="navbar-collapse collapse" style="height: 1px;">
          <ul id="main-menu" class="nav navbar-nav navbar-right">
            <li class="dropdown hidden-xs">
                <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                    <span class="glyphicon glyphicon-user padding-right-small" style="position:relative;top: 3px;"></span>
                     <?php echo $_SESSION['user']['name'];?> 
                    <i class="fa fa-caret-down"></i>
                </a>
                <ul class="dropdown-menu">
                    <li><a tabindex="-1" href="/admin/login/logout">退出</a></li>
                </ul>             
            </li>
          </ul>
        </div>
      </div>
 
        <div role="main">
            <table id="frametable" cellpadding="0" cellspacing="0" width="100%" height="100%" style="width: 100%;">
                <tr>
                   <td valign="top" width="10%" height="100%">
                        <div class="left">
                        <div class="panel-group" id="accordion">
                            <div class="panel panel-default">
                                <div class="panel-heading">
                                    <h4 class="panel-title">
                                        <a class="nav-header" data-toggle="collapse" data-parent="#accordion" href="#collapseSix">门&nbsp;&nbsp;&nbsp;店</a>
                                    </h4>
                                </div>
                                <div id="collapseSix" class="panel-collapse collapse ">
                                    <div class="panel-body">
                                          <div>
                                            <a href='/admin/company' target="main">公司列表</a>
                                          </div>
                                    </div>
                                    <div id="collapseSix" class="panel-collapse collapse in">
                                        <div class="panel-body">
                                              <div>
                                                <a href='/admin/store' target="main">门店列表</a>
                                              </div>
                                        </div>
                                    </div>
                                </div>                      
                            </div>
                            
                            
                            <div class="panel panel-default">
                                <div class="panel-heading">
                                    <h4 class="panel-title">
                                        <a class="nav-header" data-toggle="collapse" data-parent="#accordion" href="#collapseOne">活&nbsp;&nbsp;&nbsp;动</a>
                                    </h4>
                                </div>
                                <div id="collapseOne" class="panel-collapse collapse ">
                                    <div class="panel-body">
                                          <div>
                                            <a href='/admin/Index/actions?status=1' target="main">已发布</a>
                                          </div>
                                    </div>
                                    <div id="collapseOne" class="panel-collapse collapse in">
                                        <div class="panel-body">
                                              <div>
                                                <a href='/admin/Index/actions?status=2' target="main">草&nbsp;&nbsp;&nbsp;稿</a>
                                              </div>
                                        </div>
                                    </div>
                                </div>                      
                            </div>
                            <div class="panel panel-default">
                                <div class="panel-heading">
                                    <h4 class="panel-title">
                                        <a data-toggle="collapse"  class="nav-header"  data-parent="#accordion" href="#collapseTwo">订&nbsp;&nbsp;&nbsp;单</a>                                        
                                    </h4>
                                </div>
                                <div id="collapseTwo" class="panel-collapse collapse ">
                                    <div class="panel-body">
                                          <div>
                                            <a href='/admin/Index/orders?status=2' target="main">已完成</a>
                                          </div>
                                    </div>
                                <div id="collapseTwo" class="panel-collapse collapse in ">
                                    <div class="panel-body">
                                            <div>
                                                 <a href='/admin/Index/orders?status=1' target="main">已付定金</a>
                                            </div>
                                    </div>
                                </div>
                                <div id="collapseTwo" class="panel-collapse collapse in ">
                                    <div class="panel-body">
                                        <div>
                                            <a href='/admin/Index/orders?status=0' target="main">未完成</a>
                                        </div>
                                    </div>
                                </div>
                              </div>                      
                           </div>
                            
                            
                            <div class="panel panel-default">
                                <div class="panel-heading">
                                    <h4 class="panel-title">
                                        <a data-toggle="collapse"  class="nav-header"  data-parent="#accordion" href="#collapseFour">申请入驻</a>                                        
                                    </h4>
                                </div>
                                <div id="collapseFour" class="panel-collapse collapse ">
                                    <div class="panel-body">
                                          <div>
                                            <a href='/admin/Business' target="main">申请列表</a>
                                          </div>
                                    </div>
                              </div>                     
                           </div>
                            <div class="panel panel-default">
                                <div class="panel-heading">
                                    <h4 class="panel-title">
                                        <a data-toggle="collapse"  class="nav-header"  data-parent="#accordion" href="#collapseFive">用户反馈</a>                                        
                                    </h4>
                                </div>
                                <div id="collapseFive" class="panel-collapse collapse ">
                                    <div class="panel-body">
                                          <div>
                                            <a href='/admin/suggest' target="main">反馈列表</a>
                                          </div>
                                    </div>
                              </div>                     
                           </div>
                            
                            
                            
                           <?php if($_SESSION['user']['is_admin']==1){ ?>
                            <div class="panel panel-default">
                                <div class="panel-heading">
                                    <h4 class="panel-title">
                                        <a class="nav-header" data-toggle="collapse" data-parent="#accordion" href="#collapseThree">用&nbsp;&nbsp;&nbsp;户</a>
                                    </h4>
                                </div>    
                                <div id="collapseThree" class="panel-collapse collapse ">
                                    <div class="panel-body">
                                          <div>
                                            <a href='/admin/user/lists' target="main">用户列表</a>
                                          </div>
                                    </div>
                                    <div id="collapseThree" class="panel-collapse collapse in">
                                        <div class="panel-body">
                                              <div>
                                                <a href='/admin/User/create' target="main">创建用户</a>
                                              </div>
                                        </div>
                                    </div>
                                </div>                          
                            </div>

                            <div class="panel panel-default">
                                <div class="panel-heading">
                                    <h4 class="panel-title">
                                        <a class="nav-header" data-toggle="collapse" data-parent="#accordion" href="#collapseSeven">商&nbsp;&nbsp;&nbsp;品</a>
                                    </h4>
                                </div>    
                                <div id="collapseSeven" class="panel-collapse collapse ">
                                    <div class="panel-body">
                                          <div>
                                            <a href='/admin/item' target="main">商品列表</a>
                                          </div>
                                    </div>
                                    <div id="collapseSeven" class="panel-collapse collapse in">
                                        <div class="panel-body">
                                              <div>
                                                <a href='/admin/Item/create' target="main" >创建商品</a>
                                              </div>
                                        </div>
                                    </div>
                                </div>                          
                            </div>
                            <?php } ?>
                        </div>
                        </div>
                    </td>   
                    <td valign="top" width="100%" height="100%">                            
                        <iframe id="iframe" about:blank name="main"  width="100%" allowtransparency="true" height="100%"
                            frameborder="0" scrolling="yes" style="overflow: visible;"  
                            src="<?php if(!$_SESSION['user']['user_name']){echo '/admin/login';}else{echo '/admin/index/welcome';}?>"></iframe>
                    </td>
                </tr>
            </table>
        </div>
</body>
<style>


#frametable .left {
    width: 200px;
    border-right: 2px solid #999;
    background: #ddd;
    height: 100%;
}
 

#class {
    background-color:#ddd; 
}
#form {
    margin-top:10rem;
}
 
</style>


</html>